{extend name="public/base"}

{block name="style"}
<link href="__STATIC__/admin/css/index.css" type="text/css" rel="stylesheet">
<link href="__STATIC__/admin/css/style.css" type="text/css" rel="stylesheet">
<link href="__STATIC__/admin/css/style2.css" type="text/css" rel="stylesheet">
{/block}

{block name="main"}
    <div style="margin-top:10px;">
        <h3 class="title1" style="margin-left:28px;font-size:15px;">个人信息</h3>
    </div>

    <div style="margin-top:30px;">
        <div class="layui-form-item">
            <label class="layui-form-label">登录账号：</label>
            <div class="layui-input-inline" style="margin-top:8px;">
                bjhytx
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">登陆密码</label>
            <div class="layui-input-inline">
                <input name="txtLoginPwd" type="password" id="txtLoginPwd" lay-verify="required" autocomplete="off" placeholder="请输入登陆密码" class="layui-input" ReadOnly="ReadOnly" value="*********" style="background-color:#eee;" />
            </div>
            <input name="chkChange" type="checkbox" id="chkChange" lay-skin="primary" title="修改密码" lay-filter="change" />
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">确认登陆密码：</label>
            <div class="layui-input-inline">
                <input name="txtRLoginPwd" type="password" id="txtRLoginPwd" lay-verify="required|checkpwd" autocomplete="off" placeholder="确认登陆密码" class="layui-input" ReadOnly="ReadOnly" value="*********" style="background-color:#eee;" />
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">手机号：</label>
            <div class="layui-input-inline">
                <input name="txtMobile" type="text" value="12345678910" id="txtMobile" lay-verify="required|phone" autocomplete="off" placeholder="请输入手机号" class="layui-input" />
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">邮箱：</label>
            <div class="layui-input-inline">
                <input name="txtEmail" type="text" value="bjhytx@163.com" id="txtEmail" lay-verify="required|email" autocomplete="off" placeholder="请输入邮箱" class="layui-input" />
            </div>
        </div>
        <div id="IsPrice" class="layui-form-item">
            <label class="layui-form-label">发票成本价：</label>
            <div class="layui-input-inline">
                <input name="TextBox1" type="text" value="0.07000" id="TextBox1" lay-verify="required|decimal" autocomplete="off" placeholder="请输入发票成本价格百分比" class="layui-input" />
            </div>
        </div>
        <div id="Div2" class="layui-form-item">
            <label class="layui-form-label">照片成本价：</label>
            <div class="layui-input-inline">
                <input name="TextBox3" type="text" value="15.00" id="TextBox3" lay-verify="required" autocomplete="off" placeholder="照片成本价" class="layui-input" />
            </div>
        </div>
        <div id="Div1" class="layui-form-item">
            <label class="layui-form-label">查帐密码：</label>
            <div class="layui-input-inline">
                <input name="TextBox2" type="text" value="123456" id="TextBox2" lay-verify="required" autocomplete="off" placeholder="密码维护" class="layui-input" />
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">所属职位：</label>
            <div class="layui-input-inline" style="margin-top:8px;">
                北京环游天下[预置]公司管理员
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">所属部门:</label>
            <div class="layui-input-inline" style="margin-top:8px;">

            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-input-block">
                <input type="submit" name="btnSubmit" value="保存" id="btnSubmit" class="layui-btn layui-btn-normal" lay-submit="" lay-filter="submit" role="" />
                <a href="" class="layui-btn layui-btn-primary">返回列表</a>
            </div>
        </div>
    </div>
{/block}

{block name="javascript"}
<script>
    layui.use(['form'], function () {
        var $ = layui.jquery,
            form = layui.form();

        form.on("checkbox(change)", function (data) {
            if (data.elem.checked) {
                $("#txtLoginPwd").val("");
                $("#txtRLoginPwd").val("");
                $("#txtLoginPwd").removeAttr("readonly").css("background-color", "#fff");
                $("#txtRLoginPwd").removeAttr("readonly").css("background-color", "#fff");
            } else {
                $("#txtLoginPwd").attr("readonly", "readonly").css("background-color", "#eee");
                $("#txtRLoginPwd").attr("readonly", "readonly").css("background-color", "#eee");
            }
        });

        form.verify({
            checkpwd: function (value) {
                if (value != $("#txtLoginPwd").val()) {
                    return "两次输入的密码不一样";
                }
            },
            Name: function (v) {
                if (!new RegExp("^[a-zA-Z0-9_\u4e00-\u9fa5\\s·]+$").test(v)) {
                    return '不能有特殊字符';
                }
                if (!(/^[\u0391-\uFFE5A-Za-z]+$/.test(v))) {
                    return '只能为中文和英文';
                }
            }
        });
    });
</script>
{/block}